﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using PropertyChanged;
namespace AgileLogistics.Model
{[AddINotifyPropertyChangedInterface]
    [SqlSugar.SugarTable("NotiteUsers")]
  public  class NoticeUsers
    {


        private DBContext dBContext = new DBContext();

        [SqlSugar.SugarColumn(IsPrimaryKey = true, IsIdentity = true)]
        public int Id { get; set; }
        public int NoticeId { get; set; }
        public string UserId { get; set; }
        public bool IsRead { get; set; }
        public DateTime ReadTime { get; set; }


        [SqlSugar.SugarColumn(IsIgnore =true)]
        public bool IsNew { get; set; }
      

        [SqlSugar.SugarColumn(IsIgnore = true)]
        public Notice Notice 
        {
            get
            {
                return dBContext.DB.Queryable<Model.Notice>().Where(n => n.Id == this.NoticeId).First();
            }
            set
            {

            }
        }
    }
}
